// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "SimpleAI.generated.h"

UCLASS()
class RPG_CPP_API ASimpleAI : public ACharacter
{
	GENERATED_BODY()

public:
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "AI", meta = (AllowPrivateAccess = "true"))
		class UPawnSensingComponent *PawnSensingComponent;
	// Sets default values for this character's properties
	ASimpleAI();
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "CharacterValues")
		float Health;
	UFUNCTION(BlueprintCallable, Category = "CharacterStatesFunction")
		void Death();


protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

public:
	virtual float TakeDamage(float Damage, struct FDamageEvent const& DamageEvent, AController* EventInstigator, AActor* DamageCauser) override;
	// Called every frame
	virtual void Tick(float DeltaTime) override;

	// Called to bind functionality to input
	virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
	UFUNCTION()
		void AISeePawn(APawn* Pawn);
};
